package com.itheima.dao;

import com.itheima.domain.Goods;
import org.springframework.stereotype.Repository;

@Repository
public class GoodsDao {
    public Goods findById(int id) {
        if (id == 1) {
            return new Goods(1, "一加手机", "2020-10", 3999);
        } else if (id == 2) {
            return new Goods(2, "荣耀手机", "2020-10", 2999);
        } else {
            return new Goods(3, "苹果手机", "2020-10", 6999);
        }
    }
}
